<!doctype html>
<!--[if lt IE 7]>
<html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]>
<html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]>
<html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!-->
<html class="no-js"> <!--<![endif]-->
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="keywords" content="安信立融,北京安信立融,J博士安信立融,J博士投资管理系统,股权投资项目管理系统,股权投资平台,并购基金投资管理系统,引导基金投资管理系统,PE投资管理系统,股权投资平台,母基金管理系统,项目投资管理平台,引导基金投资管理系统,引导基金管理平台">
  <meta name="description" content="北京安信立融科技股份有限公司——J博士-做中国私募投资领域中专业的IT信息服务商[股权投资管理系统|并购基金投资管理系统|股权投资平台|引导基金投资管理系统|PE管理系统|PE投资管理系统|	引导基金管理平台|引导基金投资管理系统|PE管理系统|PE投资管理系统|引导基金管理平台...]">
	<title>J博士投资管理系统</title>
  <meta name="description" content="">
  <meta name="viewport"
        content="initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no, width=device-width">
  <!-- Place favicon.ico and apple-touch-icon.png in the root directory -->

  <link rel="Stylesheet" media="screen" href="editor-app/libs/ng-grid-2.0.7.min.css" type="text/css"/>
  <link rel="stylesheet" href="editor-app/libs/bootstrap_3.1.1/css/bootstrap.min.css"/>

  <link rel="Stylesheet" media="screen" href="editor-app/editor/css/editor.css" type="text/css"/>
  <link rel="stylesheet" href="editor-app/css/style.css" type="text/css"/>

  <link rel="stylesheet" href="editor-app/css/style-common.css">
  <link rel="stylesheet" href="editor-app/css/style-editor.css">


</head>
<body>

<div class="navbar navbar-fixed-top navbar-inverse" role="navigation" id="main-header" style="display:none">
  <div class="navbar-header">
    <a href="" ng-click="backToLanding()" class="navbar-brand"
       title="{{'GENERAL.MAIN-TITLE' | translate}}"><span
      class="sr-only">{{'GENERAL.MAIN-TITLE' | translate}}</span></a>
  </div>
</div>

<!--[if lt IE 9]>
<div class="unsupported-browser">
  <p class="alert error">You are using an unsupported browser. Please upgrade your browser in order to use the
    editor.</p>
</div>
<![endif]-->

<div class="alert-wrapper" ng-cloak>
  <div class="alert fadein {{alerts.current.type}}" ng-show="alerts.current" ng-click="dismissAlert()">
    <i class="glyphicon"
       ng-class="{'glyphicon-ok': alerts.current.type == 'info', 'glyphicon-remove': alerts.current.type == 'error'}"></i>
    <span>{{alerts.current.message}}</span>

    <div class="pull-right" ng-show="alerts.queue.length > 0">
      <span class="badge">{{alerts.queue.length + 1}}</span>
    </div>
  </div>
</div>

<div id="main" class="wrapper full clearfix" ng-style="{height: window.height + 'px'}" ng-app="activitiModeler"
     ng-include="'editor-app/editor.html'" style="padding-top: 0px">
</div>


<!--[if lt IE 9]>
<script src="editor-app/libs/es5-shim-15.3.4.5/es5-shim.js"></script>
<script src="editor-app/libs/json3_3.2.6/lib/json3.min.js"></script>
<![endif]-->

<script src="editor-app/libs/jquery_1.11.0/jquery.min.js"></script>
<script src="editor-app/libs/jquery-ui-1.10.3.custom.min.js"></script>


<script src="editor-app/libs/angular_1.2.13/angular.min.js"></script>
<script src="editor-app/libs/angular_1.2.13/angular-animate.min.js"></script>
<script src="editor-app/libs/bootstrap_3.1.1/js/bootstrap.min.js"></script>
<script src="editor-app/libs/angular-resource_1.2.13/angular-resource.min.js"></script>
<script src="editor-app/libs/angular-cookies_1.2.13/angular-cookies.min.js"></script>
<script src="editor-app/libs/angular-sanitize_1.2.13/angular-sanitize.min.js"></script>
<script src="editor-app/libs/angular-route_1.2.13/angular-route.min.js"></script>
<script src="editor-app/libs/angular-translate_2.4.2/angular-translate.min.js"></script>
<script src="editor-app/libs/angular-translate-storage-cookie/angular-translate-storage-cookie.js"></script>
<script src="editor-app/libs/angular-translate-loader-static-files/angular-translate-loader-static-files.js"></script>
<script src="editor-app/libs/angular-strap_2.0.5/angular-strap.min.js"></script>
<script src="editor-app/libs/angular-strap_2.0.5/angular-strap.tpl.min.js"></script>
<script src="editor-app/libs/momentjs_2.5.1/momentjs.min.js"></script>

<script src="editor-app/libs/ui-utils.min-0.0.4.js" type="text/javascript"></script>
<script src="editor-app/libs/ng-grid-2.0.7-min.js" type="text/javascript"></script>
<script src="editor-app/libs/angular-dragdrop.min-1.0.3.js" type="text/javascript"></script>
<script src="editor-app/libs/mousetrap-1.4.5.min.js" type="text/javascript"></script>
<script src="editor-app/libs/jquery.autogrow-textarea.js" type="text/javascript"></script>

<script src="editor-app/libs/prototype-1.5.1.js" type="text/javascript"></script>
<script src="editor-app/libs/path_parser.js" type="text/javascript"></script>

<script src="editor-app/libs/angular-scroll_0.5.7/angular-scroll.min.js" type="text/javascript"></script>

<!-- Configuration -->
<script src="editor-app/app-cfg.js?v=1"></script>
<script src="editor-app/editor-config.js" type="text/javascript"></script>
<script src="editor-app/configuration/url-config.js" type="text/javascript"></script>

<script src="editor-app/editor/i18n/translation_en_us.js" type="text/javascript"></script>
<script src="editor-app/editor/i18n/translation_signavio_en_us.js" type="text/javascript"></script>
<script src="editor-app/editor/oryx.debug.js" type="text/javascript"></script>

<script src="editor-app/app.js"></script>

<script src="editor-app/eventbus.js" type="text/javascript"></script>

<script src="editor-app/editor-controller.js" type="text/javascript"></script>
<script src="editor-app/stencil-controller.js?v=2" type="text/javascript"></script>
<script src="editor-app/toolbar-controller.js" type="text/javascript"></script>
<script src="editor-app/header-controller.js" type="text/javascript"></script>
<script src="editor-app/select-shape-controller.js" type="text/javascript"></script>

<script src="editor-app/editor-utils.js" type="text/javascript"></script>
<script src="editor-app/configuration/toolbar-default-actions.js" type="text/javascript"></script>

<script src="editor-app/configuration/properties-default-controllers.js" type="text/javascript"></script>
<script src="editor-app/configuration/properties-execution-listeners-controller.js" type="text/javascript"></script>
<script src="editor-app/configuration/properties-event-listeners-controller.js" type="text/javascript"></script>
<script src="editor-app/configuration/properties-assignment-controller.js" type="text/javascript"></script>
<script src="editor-app/configuration/properties-fields-controller.js" type="text/javascript"></script>
<script src="editor-app/configuration/properties-form-properties-controller.js" type="text/javascript"></script>
<script src="editor-app/configuration/properties-in-parameters-controller.js" type="text/javascript"></script>
<script src="editor-app/configuration/properties-multiinstance-controller.js" type="text/javascript"></script>
<script src="editor-app/configuration/properties-out-parameters-controller.js" type="text/javascript"></script>
<script src="editor-app/configuration/properties-task-listeners-controller.js" type="text/javascript"></script>
<script src="editor-app/configuration/properties-sequenceflow-order-controller.js" type="text/javascript"></script>
<script src="editor-app/configuration/properties-condition-expression-controller.js" type="text/javascript"></script>
<script src="editor-app/configuration/properties-signal-definitions-controller.js" type="text/javascript"></script>
<script src="editor-app/configuration/properties-signal-scope-controller.js" type="text/javascript"></script>
<script src="editor-app/configuration/properties-message-definitions-controller.js" type="text/javascript"></script>
<script src="editor-app/configuration/properties-message-scope-controller.js" type="text/javascript"></script>

<script src="editor-app/configuration/toolbar.js" type="text/javascript"></script>
<script src="editor-app/configuration/toolbar-custom-actions.js" type="text/javascript"></script>

<script src="editor-app/configuration/properties.js" type="text/javascript"></script>
<script src="editor-app/configuration/properties-custom-controllers.js" type="text/javascript"></script>
<script src="editor-app/configuration/services/identity-services.js" type="text/javascript"></script>

<!--刘翔宇加  start-->
<script src="layui/layui.all.js"></script>
<link type="text/css" href="layui/css/layui.css">
<script src="js/jquery.base64.js"></script>
<!--刘翔宇加  end-->

<script>
  (
    function (open) {
      XMLHttpRequest.prototype.open = function (method, url, async, user, pass) {
          open.call(this, method, url, async, user, pass);//this指XMLHttpRequest
          this.setRequestHeader("Authorization", window.parent.getMyVue.token);//mounted时传入的
      }
    }
  )(XMLHttpRequest.prototype.open)

  // 获取token
  function getToken() {
    return window.parent.getMyVue.token;
  }

</script>
<script type="text/javascript">

  //layui窗口的index
  var layerIndex = null;

  //临时保存分配用户节点的数据
  var listenerIndex;
  var scope;

  function templistener(listenerIndexValue, scopeValue) {
    listenerIndex = listenerIndexValue;
    scope = scopeValue;
  }


  //修改用户组监听器的值
  function updateApproverListener(listenerValue, isSign) {
    if (isSign == 'Y') {
      scope.selectedItem.properties[listenerIndex].value = {assignment: {assignee: "\${act_per}"}};
      scope.updatePropertyInModel(scope.selectedItem.properties[listenerIndex]);
      for (var i = 0; i < scope.selectedItem.properties.length; i++) {
        if (scope.selectedItem.properties[i].title == '集合(多实例)') {
          scope.selectedItem.properties[i].value = listenerValue;
          scope.updatePropertyInModel(scope.selectedItem.properties[i]);
        } else if (scope.selectedItem.properties[i].title == '元素变量(多实例)') {
          scope.selectedItem.properties[i].value = "act_per";
          scope.updatePropertyInModel(scope.selectedItem.properties[i]);
        } else if (scope.selectedItem.properties[i].title == '多实例类型') {
          scope.selectedItem.properties[i].value = "Parallel";
          scope.updatePropertyInModel(scope.selectedItem.properties[i]);
        }

      }
    } else {
      scope.selectedItem.properties[listenerIndex].value = {assignment: {candidateUsers: [{value: listenerValue}]}}
      scope.updatePropertyInModel(scope.selectedItem.properties[listenerIndex]);

      for (var i = 0; i < scope.selectedItem.properties.length; i++) {
        if (scope.selectedItem.properties[i].title == '集合(多实例）') {
          scope.selectedItem.properties[i].value = "";
          scope.updatePropertyInModel(scope.selectedItem.properties[i]);
        } else if (scope.selectedItem.properties[i].title == '元素变量(多实例)') {
          scope.selectedItem.properties[i].value = "";
          scope.updatePropertyInModel(scope.selectedItem.properties[i]);
        } else if (scope.selectedItem.properties[i].title == '多实例类型') {
          scope.selectedItem.properties[i].value = "";
          scope.updatePropertyInModel(scope.selectedItem.properties[i]);
        }

      }
    }

  }

  //打开选择审批人的页面
  function openApproval(uuid, listener, isSign, configType, modelId) {
    listener = baseL('encode', listener);
    layerIndex = window.layer.open({
      title: "选择审批人",
      area: ['70%', '80%'],
      type: 2,
      content: 'approver/approver.html?actUuid=' + uuid + '&listener=' + listener + '&isSign=' + isSign + '&configType=' + configType + "&modelId=" + modelId
    });


  }
  //上一个节点的表单属性
  var formPropertiesTemp = null;
  // 之前配置的值
  var oldValueTemp = null;
  /**
   * 打开条件配置页面
   * */
  function openConditions(formProperties,oldValue,modelId){
    oldValueTemp = oldValue;
    formPropertiesTemp = formProperties;

    layerIndex = window.layer.open({
      title: "选择审批人",
      area: ['70%', '80%'],
      type: 2,
      content: 'conditions/conditions.html?modelId='+modelId
    });

  }


  function CloseWindow(action) {
    if (window.CloseOwnerWindow) return window.CloseOwnerWindow(action);
    else window.close();
  }


  function closeLayer() {
    window.layer.close(layerIndex);
  }

  /**
   * 获取后台地址
   */
  function getBackUrl() {
    return window.parent.getMyVue.backUrl
  }


  //给流条件赋值
  function setConditionsValue(showValue,hideValue,type){
    if(hideValue!=""){
      var formType = scope.editor.getModelMetaData().formType;
      var formValue = scope.editor.getModelMetaData().formValue;

      if(type=='1'){
        scope.selectedItem.properties[listenerIndex].value=hideValue;
      }else{
        //scope.selectedItem.properties[listenerIndex].value="\${"+hideValue+"}";
        scope.selectedItem.properties[listenerIndex].value="\${conditionsListener.conditions(execution,\""+hideValue+"\")}";
        //scope.selectedItem.properties[listenerIndex].showValue=showValue;
      }
      //给流条件对应的名称赋值
      for(i=0;i<scope.selectedItem.properties.length;i++){
        if(scope.selectedItem.properties[i].title=="名称"){
          scope.selectedItem.properties[i].value=showValue;
          scope.updatePropertyInModel(scope.selectedItem.properties[i]);
          break;
        }
      }
    }else{
      scope.selectedItem.properties[listenerIndex].value="";
    }
    scope.updatePropertyInModel(scope.selectedItem.properties[listenerIndex]);
  }


  function openRequiredFile(uuid){
    layerIndex = window.layer.open({
      title: "选择必填附件",
      area: ['50%', '50%'],
      type: 2,
      content: 'file/requiredfile.html?actUuid=' + uuid
    });
  }

</script>


</body>
</html>
